#include <stdio.h>
#define NUM 101
#include <string.h>
#include <unistd.h>
void ProcessBar()
{
    char bar[NUM] = {0};
    memset(bar, 0, sizeof(char) * NUM);
    char style[4] = {'>', '#', '*', '&'};
    const char* label = "-\\|/";
    int i = 0;
    for(; i < NUM; ++i)
    {
        printf("[%-100s][%d%%][%c]\r", bar, i, label[i % 4]);
        fflush(stdout);
        bar[i] = style[N];
        usleep(50000);
    }
    printf("\n");
}
int main()
{
    ProcessBar();
    return 0;
}
